package com.wen.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wen.pojo.SupplierProduct;
import com.wen.pojo.dto.SupplierProductDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SupplierProductMapper extends BaseMapper<SupplierProduct> {

    @Select("SELECT sp.*,p.`name`,p.`picture`,p.unit FROM `supplier_product` sp INNER JOIN product p WHERE sp.`product_id`=p.`id` AND sp.`supplier_id`=#{id}")
    List<SupplierProductDto> SupplierProductAll(Long id);
}
